$(document).ready(function (){

    var path = location.href;
    var id = path.substring(path.lastIndexOf("/")+1)

    $.ajax({
        url: "/fenlei/"+ id,
        type: 'GET',
        data: {

        },
        dataType: "JSON",
        async: false,
        success: function (res) {
            if(res.code === "200") {
                var data = res.data;
                $("#name").val(data.name);
            }else {
                alert(res.msg)
            }
        },
        error: function (e){
            alert('发生错误')
        }

    })

})